<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/common/common.jspf"%>
<script type="text/javascript"
	src="${ctx}/js/transport/dispatch/transportdispatch_edit.js"></script>

<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
}

.col-sm-9 {
	width: 85%;
	float: left;
}

label[class^="btn btn-default"] {
	margin-top: -4px;
}
</style>
<script type="text/javascript" src="${ctx}/js/jedate/jedate.js"></script>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post"
		action="${ctx}/transportDispatch/transportDispatch_editEntity.shtml">
		<input type="hidden" class="form-control checkacc" value="${transportDispatch.id}"
			name="transportDispatch.id" id="id">
		<section class="panel panel-default">

		<div class="panel-body">
			<div class="form-group">
				
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">请选择物料编码</label>
						<select>
							<option>请选择</option>
							
						</select>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">请输入物料编码</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入内容"/>
				</div>
			</div>
			
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">模具编号</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入内容" readonly
						name="transportDispatchFormMap.category" value="${transportDispatch.category }" id="category" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">客户/发往单位</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入内容" readonly
						name="transportDispatchFormMap.name" value="${transportDispatch.name }" id="name" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">送货单号</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入内容" readonly
						name="transportDispatchFormMap.outReceiptNo" value="${transportDispatch.outReceiptNo }" id="outReceiptNo" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">件数</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入内容"
						name="transportDispatchFormMap.count" value="${transportDispatch.number }" id="number" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">包数</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入内容"
						name="transportDispatchFormMap.count" value="${transportDispatch.packNum }" id="packNum" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">实出</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入内容"
						name="transportDispatchFormMap.Real" value="${transportDispatch.Real }" id="Real" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			
			<div class="form-group">
				<label class="col-sm-3 control-label">跟车员</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入内容" 
						name="transportDispatchFormMap.withCarpart" value="${transportDispatch.withCarpart }" id="withCarpart" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">备注</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入内容"
						name="transportDispatchFormMap.remake" value="${transportDispatch.remake }" id="remake" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
		</div>
		
			<!-- 开始打印标签 -->
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="panel panel-default">
				<div class="panel-body">
					<table class="table table-bordered">
						<thead>
							<tr>
								<th style="text-align: center;width:176px;">出仓单号</th>
								<th style="text-align: center;width:176px;">物料/模具编码</th>
								<th style="text-align: center;width:135px;">客户编码 </th>
								<th style="text-align: center;width:136px;">出货日期时间</th>
								<th style="text-align: center;width:136px;">订单名称</th>
								<th style="text-align: center;width:136px;">订单数量</th>
								<th style="text-align: center;width:136px;">价格（单价）</th>
								<th style="text-align: center;width:136px;">备注</th>
								<th style="text-align: center;"><input type="button"
									class="btn btn-primary" onclick="insert_row(this)" value="增加"></th>
								<th style="text-align: center;"><input type="button"
									class="btn btn-danger" onclick="deleteRow(this)" value="删除"></th>
							</tr>
						</thead>
						<tbody id="tbl">
							<c:forEach var="l" items="${label }">
									<tr>
									<%-- <td>
										<div class="input-group">
											<input type="text" class="form-control"
												name="planNo_1" value="${l.planNo}">
										</div>
									</td>
									<td>
										<div class="input-group">
											<input type="text" class="form-control"
												name="print_1" value="${l.print}">
										</div>
									</td>
									<td>
										<div class="input-group">
											<input type="number" min="0" class="form-control"
												name="printCount_1" value="${l.printCount}">
										</div>
									</td> --%>
									<td>
										<div class="input-group">
											<input type="number" min="0" class="form-control"
												name="abolish_1" value="${l.abolish}">
										</div>
									</td>
									<td>
										<div class="input-group">
											<input type="number" min="0" class="form-control"
												name="normalCount_1" value="${l.normalCount}">
										</div>
									</td>
									<td>
										<div class="input-group">
											<input type="number" min="0" class="form-control"
												name="differentCount_1" value="${l.differentCount}">
										</div>
									</td>
									<td>
										<div class="input-group">
											<input type="number" min="0" class="form-control"
												name="normalEnter_1" value="${l.normalEnter}">
										</div>
									</td>
									<td>
										<div class="input-group">
											<input type="number" min="0" class="form-control"
												name="differentEnter_1" value="${l.differentEnter}">
										</div>
									</td>
									<td>
										<div class="input-group">
											<input type="number" min="0" class="form-control"
												name="handwork_1" value="${l.handwork}">
										</div>
									</td>
									<td>
										<div class="input-group">
											<input type="number" min="0" class="form-control"
												name="intoCount_1" value="${l.intoCount}">
										</div>
									</td>
									<td>
										<div class="input-group">
											<input type="number" min="0" class="form-control"
												name="totalEnter_1" value="${l.totalEnter}">
										</div>
									</td>
									<td>
										<div class="input-group">
											<input type="number" min="0" class="form-control"
												name="produceDifferent_1" value="${l.produceDifferent}">
										</div>
									</td>
									<td>
										<div class="input-group">
											<input type="number" min="0" class="form-control"
												name="packDifferent_1" value="${l.packDifferent}">
										</div>
									</td>
									<td>
										<div class="input-group">
											<input type="text" class="form-control" readonly
												name="returnCount_1" value="${l.returnCount}">
										</div>
									</td>
									<td>
										<div class="input-group">
											<input type="text" class="form-control" readonly
												name="damageCount_1" value="${l.damageCount}">
										</div>
									</td>
									<td>
										<div class="input-group">
											<input type="text" class="form-control"
												name="printRemark_1" value="${l.printRemark}">
										</div>
									</td>
									<td><input type="button" class="btn btn-primary"
										onclick="insert_row(this)" value="增加"></td>
									<td><input type="button" class="btn btn-danger"
										onclick="deleteRow(this)" value="删除"></td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
				</div>
			</div>
		<footer class="panel-footer text-right bg-light lter"> 
		<button type="submit" class="btn btn-success btn-s-xs">提交</button>
		</footer>
		</section>
	</form>
	<script type="text/javascript">
		var i = 0
		function insert_row(obj) {
			i++;
			R = tbl.insertRow(tbl.rows.length);
			C = R.insertCell(0);
			C.innerHTML = '<div class="input-group"><input type="text" class="form-control" name="planNo_1"></div>';
			C = R.insertCell(1);
			C.innerHTML = '<div class="input-group"><input type="text" class="form-control" name="print_1"></div>';
			C = R.insertCell(2);
			C.innerHTML = '<div class="input-group"><input type="number" min="0" class="form-control" name="printCount_1"></div>';
			C = R.insertCell(3);
			C.innerHTML = '<div class="input-group"><input type="number" min="0" class="form-control" name="abolish_1"></div>';
			C = R.insertCell(4);
			C.innerHTML = '<div class="input-group"><input type="number" min="0" class="form-control" name="normalCount_1"></div>';
			C = R.insertCell(5);
			C.innerHTML = '<div class="input-group"><input type="number" min="0" class="form-control" name="differentCount_1"></div>';
			C = R.insertCell(6);
			C.innerHTML = '<div class="input-group"><input type="number" min="0" class="form-control" name="normalEnter_1"></div>';
			C = R.insertCell(7);
			C.innerHTML = '<div class="input-group"><input type="number" min="0" class="form-control" name="differentEnter_1"></div>';
			C = R.insertCell(8);
			/*C.innerHTML = '<div class="input-group"><input type="number" min="0" class="form-control" name="handwork_1"></div>';
			C = R.insertCell(9);
			C.innerHTML = '<div class="input-group"><input type="number" min="0" class="form-control" name="intoCount_1"></div>';
			C = R.insertCell(10);
			C.innerHTML = '<div class="input-group"><input type="number" min="0" class="form-control" name="totalEnter_1"></div>';
			C = R.insertCell(11);
			C.innerHTML = '<div class="input-group"><input type="number" min="0" class="form-control" name="produceDifferent_1"></div>';
			C = R.insertCell(12);
			C.innerHTML = '<div class="input-group"><input type="number" min="0" class="form-control" name="packDifferent_1"></div>';
			C = R.insertCell(13);
			C.innerHTML = '<div class="input-group"><input type="text" readonly class="form-control" name="returnCount_1"></div>';
			C = R.insertCell(14);
			C.innerHTML = '<div class="input-group"><input type="text" readonly class="form-control" name="damageCount_1"></div>';
			C = R.insertCell(15); 
			C.innerHTML = '<div class="input-group"><input type="text" class="form-control" name="printRemark_1"></div>';
			*/
			C = R.insertCell(8);
			C.innerHTML = '<input type="button" class="btn btn-primary" onclick ="insert_row(this)" value = "增加">';
			C = R.insertCell(9);
			C.innerHTML = '<input type="button" class="btn btn-danger" onclick ="deleteRow(this)" value ="删除">';
		}
		function deleteRow(obj) {
			var i = obj.parentNode.parentNode.rowIndex;
			if (i > 0) {
				tbl.deleteRow(i-1);
			}
		}
	</script>
</body>
</html>